fix(python-sdk): upgrade fern python-sdk generator version #541
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
tl/dr: python sdks generated with the new generator version (4.23.0 and later) consume much less memory ~72 MB
Description
We were seeing issues with memory footprint from just importing the vapi python sdk.
After some investigation, we discovered that this was caused by a change in pydantic versions 2.11.0 that caused one of our config specifications to eagerly do schema validation on all types at import type. In a recent change, we modified this configuration to retain the same type safety but to defer schema validation to usage time.
Testing Steps
We did some memory profiling tests to compare the most recent vapi-server-sdk python package against a locally generated preview sdk version to compare the cost of just importing the lib. We observed memory consumption of about 72MB with the new version, which we believe should be feasible for most environments to run.
fern docs dev
or navigate to preview deployment